<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<%@include file="/WEB-INF/pages/include/prelude.jspf"%>
<%@include file="/WEB-INF/pages/include/common.jspf"%>
<link href="<c:url value='/static/css/memberInfo.css' />" type="text/css" rel="stylesheet"/>
<title>常用联系人</title>
<script type="text/javascript">
$(function(){
   	$("#pagetitle").html('常用联系人');
   	$("#pageback").hide();
});

/**
 * 选中一个自动跳转
 */
function radioChange(){
	var check = $("input:radio:checked").val();
	$("#guestId").attr("value",check);
	$("#formHidden").submit();
}
/*
function delGuest(id){
	var url="<c:url value='/member/guestDelete.do'/>";
	$.ajax({
	dataType: "json",
	url: url,
	type:"POST",
	data:{guestId:id},
	success:function(data, textStatus, jqXHR){
		if("0"==data){
			alert("删除成功！");
		}else{
			alert("删除失败！");
		}
	}
	});

	
}
*/




</script>
</head>
<body>

<div>
	<form id="formHidden" name="formHidden" action="<c:url value='/ticket/calculateTrip.do'/>" method="post" data-ajax="false" >
		<input type="hidden" name="searchId" value="${searchId }"  />
		<input type="hidden" name="index" value="${index }"  />
		<input type="hidden" name="count" value="${count }"  />
		<input type="hidden" name="customerIds" value="${customerIds }"  />
		<input type="hidden" id="guestId" name="guestId" value=""  />
		<input type="hidden" name="adultCount" value="${adultCount }"  />
		<input type="hidden" id="childCount" name="childCount" value="${childCount }"  />
	</form>
</div>




<div  data-role="page">
	<%@include file="/WEB-INF/pages/include/header.jsp"%>
	<div data-role="content">
		<div class="m_item">
			<ul>
				<c:forEach items="${requestScope.guestList }" var="guest">
				
					<li class="contact">
						<div class="i_l contact_li">
							<div class="i_mini_label_1"></div>
							<div class="i_label">姓&nbsp;&nbsp;&nbsp;名：</div><b>
							${guest.familyName }${guest.firstName }
							</b><div class="clear"></div>
							<div class="i_mini_label_1" style="position: relative;top: 15px; "><input type="radio" name="guest" onchange="radioChange();" value="${guest.id }" /> </div>
								<div class="i_label">手机号：</div> 
								<b>${guest.mobile }</b>
								<a href="<c:url value='/member/guestEditUI.do' />?guestId=${guest.id }&odSerachId=${searchId }&odIndex=${index}&count=${count }&guestId=${guestId}&customerIds=${customerIds}&adultCount=${adultCount}&childCount=${childCount}" data-ajax="false" ><img alt="修改" width="25px;" src="<c:url value='/static/img/imgs/img_edit.png' />"></a>
								<a href="<c:url value='/member/guestDelete.do' />?guestId=${guest.id }&odSerachId=${searchId }&odIndex=${index}&count=${count }&guestId=${guestId}&customerIds=${customerIds}&adultCount=${adultCount}&childCount=${childCount}" data-ajax="false" ><img alt="删除" width="25px;" src="<c:url value='/static/img/imgs/img_del.png' />"></a>
								<div class="clear"></div>
						</div>
					</li>
				</c:forEach>
			</ul>
		</div>
		<div>
			<div><button class="btn" onclick="window.location.href='<c:url value='/member/inCommContactInfo.do' />?odSerachId=${searchId }&odIndex=${index}&count=${count }&guestId=${guestId}&customerIds=${customerIds}&adultCount=${adultCount}&childCount=${childCount}'" data-theme="a" type="button">增加联系人</button></div>
		</div>
	</div>
</div>
</body>
</html>